Portfolio Project 2
Wrangling weather forecasts
Overview
For your second portfolio project, you’ll apply what you’ve learned about wrangling data. Your goal is to identify cities in the U.S. that struggle with weather prediction and explore possible reasons/patterns to why. Specifically, you will focus on the error in high and low temperature forecasting, and you may wish to also consider precipitation and outlook.
You should be careful about summarizing and joining data, and be on the lookout for data quality issues!
You should write a short report in a “blog post” format describing your findings, including an introductory paragraph that provides some context to your data and a couple paragraphs outlining your findings. That’s it. I’m looking for something that is insightful and well-crafted, rather than long and exhaustive.
You should write your blog post in quarto, create any graphics using ggplot2, and use tools from this class for data wrangling. To submit your work, push both your quarto file and rendered output document to GitHub and submit your pdf to Gradescope. Do not forget to give your post an informative title!
Data
The data for this portfolio problem is from the National Weather Service (with a very minor tweak from me, related to the criteria for earning an excellent on this assignment). The data includes sixteen months of forecasts and observations from 167 cities, as well as a separate data set with information about those cities and some other American cities.
Your repos will contain the following files:
- data/cities.csv
- data/outlook_meanings.csv
- data/weather_forecasts.csv
weather-forecasts.csv
| variable | class | description |
|---|---|---|
| date | date | date described by the forecast |
| city | factor | observation city |
| state | factor | state or territory |
| high_or_low | factor | whether the forecast is for the high temperature or the low temperature |
| forecast_hours_before | integer | the number of hours before the observation (one of 12, 24, 36, or 48) |
| observed_temp | integer | the actual observed temperature on that date (high or low) |
| forecast_temp | integer | the predicted temperature on that date (high or low) |
| observed_precip | double | the observed precipitation on that date, in inches; note that some observations lack an indication of precipitation, while others explicitly report 0 |
| forecast_outlook | factor | an abbreviation for the general outlook, such as precipitation type |
| possible_error | factor | either (1) “none” if the row contains no potential errors or (2) thename of the variable that is the cause of the potential error |
cities.csv
| variable | class | description |
|---|---|---|
| city | character | city |
| state | character | state or territory |
| lon | double | longitude |
| lat | double | latitude |
| koppen | character | Köppen climate classification |
| elevation | double | elevation in meters |
| distance_to_coast | double | distance_to_coast in miles |
| wind | double | mean wind speed |
| elevation_change_four | double | greatest elevation change in meters out of the four closest points to this city in a collection of elevations used by the team at Saint Louis University |
| elevation_change_eight | double | greatest elevation change in meters out of the eight closest points to this city in a collection of elevations used by the team at Saint Louis University |
| avg_annual_precip | double | average annual precipitation in inches |
outlook_meanings.csv
| variable | class |
|---|---|
| forecast_outlook | character |
| meaning | character |
Submission
Your submission will be a short report detailing your findings.
Rubric
A successful project will:
-
- Very few grammatical mistakes, spelling mistakes, or typos
- Informative title for your report is included
- Any graphs are readable with appropriate titles and labels
- The rendered document does not contain any unnecessary content (package loading messages, warnings, etc.)
- The rendered document does not echo your code
An excellent project will meet all of the requirements for a successful project, plus
-
- Include an appropriate visual illustrating some finding that uses the cell(s) or column(s)/variable(s) that you corrected using regex above
-
- No grammatical mistakes, spelling mistakes, or typos
- Graphs have been customized (theme, color palette, scales, size, etc.)
Can I work with someone?
This project can be done individually or in pairs. If you’d like to work with a partner, please notify me by 11am on Friday of Week 5 so I can make a joint repo for you.